package top.healthylife.gateway.platform.tc.api.api;


import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.healthylife.gateway.core.service.ParentFace;
import top.healthylife.gateway.dto.annotation.ApiServiceExplain;
import top.healthylife.gateway.platform.tc.api.util.TcHttpUtil;
import top.healthylife.gateway.platform.tc.dto.operatoronline.req.TcReqOperatorOnLineTimeV2Dto;
import top.healthylife.gateway.platform.tc.dto.operatoronline.res.TcResOperatorOnLineTimeV2Dto;

/**
 * @author GaoZeXi
 * @date 2021/7/20 13:19
 */
@Slf4j
@Service
@ApiServiceExplain(price = 20, apiName = "运营商特征_在网时长_V2_T",docUrl = "http://api.tcredit.com/norns/service/cas/doLogin" +
        "?service=http://api.tcredit.com/odin/user/sso", info = "获取指定号码的在网时长，支持携转验证。")
public class TcOperatorOnLineTimeV2Api implements ParentFace<TcReqOperatorOnLineTimeV2Dto, TcResOperatorOnLineTimeV2Dto> {

    static final String URL = "http://api.ypcredit.com/mobile/getOnlineTimeV2_t";

    @Override
    public TcResOperatorOnLineTimeV2Dto execute(TcReqOperatorOnLineTimeV2Dto dto) {
        return TcHttpUtil.getApiData(URL,dto,TcResOperatorOnLineTimeV2Dto.class);
    }
}
